# _*_ coding: utf-8 _*_
"""
Time:     2024/8/22
Author:   2051261
File:     manager.py
"""


class Manager(object):

    def __init__(self, factory):
        self._obj = None
        self.factory = factory

    @property
    def obj(self):
        obj = self._obj
        if obj is not None:
            return obj

        self._obj = obj = self.factory()
        return obj
